package com.tdkj.model.information;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanUser;

/**
 * XnkyArticleComment entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "information_info_comment")
public class BeanInfoComment extends BaseEntity implements java.io.Serializable {

	// Fields
	private BeanUser user;
	private BeanBaseInfo baseinfo;
	private String content;
	private Timestamp createtime;
	private String status;
	private String replystatus;//回复状态
	private List<BeanInfoReply> replys=new ArrayList<BeanInfoReply>();

	// Constructors

	/** default constructor */
	public BeanInfoComment() {
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "comment")
	public List<BeanInfoReply> getReplys() {
		return replys;
	}

	public void setReplys(List<BeanInfoReply> replys) {
		this.replys = replys;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "baseinfoid")
	public BeanBaseInfo getBaseinfo() {
		return baseinfo;
	}

	public void setBaseinfo(BeanBaseInfo baseinfo) {
		this.baseinfo = baseinfo;
	}
	@Column(name = "content", length = 1000)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	@Column(name = "status", length = 40)
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	
	@Column(name = "replystatus", length = 40)
	public String getReplystatus() {
		return replystatus;
	}

	public void setReplystatus(String replystatus) {
		this.replystatus = replystatus;
	}

	@Column(name = "createtime", length = 19)
	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userid")
	public BeanUser getUser() {
		return user;
	}

	public void setUser(BeanUser user) {
		this.user = user;
	}
}